//
//  ImageSliderView.h
//  WSJJ_iPad
//
//  Created by lian jie on 2/12/11.
//  Copyright 2011 2009-2010 Dow Jones & Company, Inc. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ITTImageView.h"

@protocol ImageSliderViewDelegate <NSObject>
@optional
- (void)imageClickedWithIndex:(int)imageIndex;
- (void)imageDidEndDeceleratingWithIndex:(int)imageIndex;
@end


@interface ImageSliderView : UIView <UIScrollViewDelegate,ITTImageViewDelegate> {
    id<ImageSliderViewDelegate> _delegate;
    UIScrollView *_scrollView;
    NSArray *_images;
    NSMutableSet *_recycledPages;
    NSMutableSet *_visiblePages;
	
    // these values are stored off before we start rotation so we adjust our content offset appropriately during rotation
    int           firstVisiblePageIndexBeforeRotation;
    CGFloat       percentScrolledIntoFirstVisiblePage;
}
@property (nonatomic,assign)id<ImageSliderViewDelegate> delegate;

- (id)initWithFrame:(CGRect)frame;
- (void)setInitStateFromNib;
- (void)setImages:(NSArray*)images;
- (void)updateFrame;
@end
